﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
			仓库管理系统
		</title>
       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
       <script type="text/javascript" src="http://api.map.baidu.com/api?v=1.9&ak=FEf57a4866b7c8bbc8ad003e237f4110"></script>
       <link rel="stylesheet" id="theme" type="text/css" href="Scripts/jquery-1.3/themes/gray/easyui.css"/>
       <link rel="stylesheet" type="text/css" href="Scripts/jquery-1.3/themes/icon.css"/>
       	<link rel="stylesheet" type="text/css" href="Scripts/webcontrols/demo.css">
       <script type="text/javascript" src="Scripts/jquery-1.3/jquery-1.7.2.min.js"></script>
       <script type="text/javascript" src="Scripts/jquery-1.3/jquery.easyui.min.js"></script>
       <script type="text/javascript" src="Scripts/jquery-1.3/easyloader.js"></script>

           <script src="Scripts/reconnecting-websocket-master/reconnecting-websocket.min.js" type="text/javascript"></script> 

       <script type="text/javascript" src="Scripts/webcontrols/jquery.spinnerbox.js"></script>
        <script type="text/javascript" src="Scripts/jsbase.js"></script>
        <script type="text/javascript" src="Scripts/webcontrols/toolstrip.js"></script>
        <script type="text/javascript" src="Scripts/webcontrols/jquery.datagrid.editors.js"></script>
        <script type="text/javascript" src="Scripts/webcontrols/jquery.datagrid.detailview.js"></script>
        <script type="text/javascript" src="Scripts/webcontrols/jquery.searchbox.js"></script>
        <script type="text/javascript" src="Scripts/webcontrols/datagrid.js"></script>
        <script type="text/javascript" src="Scripts/webcontrols/webcontrol.js"></script>
        <script type="text/javascript" src="Scripts/webcontrols/datasource.js"></script>
        <script type="text/javascript" src="Scripts/webcontrols/textbox.js"></script>
        <script type="text/javascript" src="Scripts/webcontrols/childform.js"></script>
        <script type="text/javascript" src="Scripts/webcontrols/searchform.js"></script>
        <script type="text/javascript" src="Scripts/webcontrols/tree.js"></script>
        <script type="text/javascript" src="Scripts/webcontrols/page/singlepage.js"></script>
        <script type="text/javascript" src="Scripts/webcontrols/page/treepage.js"></script>
        <script type="text/javascript" src="Scripts/webcontrols/AdvancedSearch.js"></script>
        <script type="text/javascript" src="Scripts/store/store.js"></script>
        <script type="text/javascript" src="Scripts/webcontrols/report/showpdf.js"></script>
    <script src="Scripts/webcontrols/reportview.js" type="text/javascript"></script>
        <script type="text/javascript" src="Scripts/upload/jquery.upload.js"></script>
        <script type="text/javascript" src="Scripts/cryptojs/rollups/md5.js"></script>
            <script type="text/javascript" src="Scripts/webcam/codeScan.js"></script>
        <script type="text/javascript" src="Scripts/webcam/webscan.js"></script>
         <script src="Scripts/echarts-master/esl.js" type="text/javascript"></script>  
        <script src="Scripts/jquery-1.3/plugins/jquery.portal.js" type="text/javascript"></script>
        <script src="Scripts/echarts-master/eacharts-acctrue.js" type="text/javascript"></script>
        <script src="Scripts/webcontrols/AccCanlendar.js" type="text/javascript"></script>
        <script src="../../Scripts/echarts-master/highcharts.js"></script>
        <script src="../../Scripts/echarts-master/highchart-adapter.js"></script>
        <script src="../../Scripts/echarts-master/chart-column.js"></script>
        <link href="Styles/Cancendar.css" rel="stylesheet" type="text/css" />
        <link href="Styles/zrender.css" rel="stylesheet" type="text/css" />

        <script type="text/javascript" >
           //获取用户名密码
           function getArgsFromUrl(sHref, sArgName) {
               var args = sHref.split("?");

               var retval = "";
               if (args[0] == sHref) /*参数为空*/
               {
                   return retval; /*无需做任何处理*/
               }
               var str = args[1];
               args = str.split("&");
               for (var i = 0; i < args.length; i++) {
                   str = args[i];
                   var arg = str.split("=");
                   if (arg.length <= 1) continue;
                   if (arg[0] == sArgName)
                       retval = arg[1];
               }
               return retval;
           }
           //获取用户名密码
           function getArgsValue(tempStr,i) {
                   var arg = tempStr.split("|^*|");
                   return arg[i];                   
           }
           //var _url = window.location + "";

           var _username = getArgsValue(window.name, 0);
           var _password = getArgsValue(window.name, 1);
           //alert("_username:" + _username + "  _password:" + _password);
           loginnewtt();

           var iii = "";
           easyloader.locale = 'zh_CN';
           function loginnewtt() {
               if (!webjs.loging) {
                  
                   webjs.loging = true;
                   //var name = $("#loginname").val();
                   //var pass = $("#password1").val();
                   var name = _username;
                   var pass = _password;
                   var passmd5 = CryptoJS.MD5(pass);
                   if (name == "" || pass == ""||name==null||pass==null)
                       window.location = "login.htm";
                   //alert(passmd5);
                   webjs.login(name, pass, function (obj) {
                       $(".easyui-layout").layout();
                       $('#mainmenu').accordion();
                       if (obj.IsLogin) {
                           $("#loginnametext").html("欢迎您【" + obj.name + "】");
                           var f = new datasource();
                           f.c = "Way.Bus.Controllers.UserController";
                           var isad = f.post("IsAdmin");
                           if (!isad) {
                               $("#pp").hide();
                           }

                           for (var i in obj.menu) {
                               var dic = obj.menu[i];
                               $('#mainmenu').accordion('add', {
                                   title: dic.Name,
                                   content: "<div style='text-align:left;padding:5px;padding-left:5px;margin-bottom:20px' id='mt" + dic.ID + "'/>",
                                   selected: false
                               });
                               var treenodes = getTreeRow(dic);
                               $("#mt" + dic.ID).tree(
                                                   {
                                                       data: treenodes,
                                                       onSelect: function (node) {
                                                           if (node.attributes.url)
                                                               opentab(node.attributes.name, node.attributes.url);
                                                       },
                                                       onBeforeLoad: function (node, param) {

                                                       }
                                                   });
                           }
                           $('#mainmenu').accordion('select', 0);
                           //首页                                           
                           $('#pp').portal({
                               border: true,
                               fit: true
                           });
                           //代办任务
                           var obj = webjs.post("Way.Bus.Controllers.ProcessStateController", "GetProcessStates", "UserId=" + webjs.obj.ID);
                           if (obj.error) {
                               $.messager.alert('异常', obj.errormsg, 'info');
                           }
                           $('#pgrid').datagrid({
                               //title: '待办任务',
                               //fit:true,
                               //width: '100%',
                               //height: '100%',
                               rownumbers: true,
                               fitColumns: true,
                               columns: obj.columns
                           });

                           $('#pgrid').datagrid('loadData', obj.data);
                           //柱图
                           columnReport($("#container"));
                           //柱图
                           barReport($("#container1"));
                       }
                   }, function (obj) {
                       window.location = "login.htm?errormsg=" + encodeURI(obj.errormsg); // fisher增加 2015-01-24 
                   });
               }
           }
           function out() {
               webjs.outlogin();
           }
           function _toLoginPage() {
               window.location = "login.htm";
           }
           ///提示跳转页面
           function systemInfoclick($pageName, $pageURL) {
               opentab($pageName, $pageURL);
           }

           function initEchart() {
               var ec = new ECharts("linebar", "Way.Bus.WMS.Controllers.BusinessLogic.EChartWorkTotalController", true);
              ec.addEvent("click", function (parm, opt) {
                   if (opt) {
                       if (ec.isFirstSearch) {
                           var lengedName, dataName;
                           if (opt.xAxis[0].type == "value") {
                               dataName = opt.yAxis[0].data[parm.dataIndex];
                           }
                           else {
                               dataName = opt.xAxis[0].data[parm.dataIndex];
                           }
                           lengedName = opt.series[parm.seriesIndex].name
                           var params = "LengedName=" + lengedName + "&DataName=" + dataName;
                           ec.search(ec, params);
                       }
                   }
               });
               ec.init();
           }

           //自定义跳转
           function myOpentab(tabTitle, tabUrl) {
               var reg = new RegExp("(^|&)Ids=([^&]*)(&|$)", "i");
               var index = tabUrl.indexOf("?");
               var r = tabUrl.substr(index + 1).match(reg);
               if (r != null) {
                   var matchQuery = unescape(r[2]);
                   $('#pgrid').attr("Ids", matchQuery);
                   opentab(tabTitle, tabUrl)
               }
           }

           function getTreeRow(dic) {
               var nodes = [];
               //有子目录r
               if (dic.childs && dic.childs.length > 0) {
                   var c;
                   for (var i in dic.childs) {
                       c = dic.childs[i];
                       var n = {};
                       n.id = c.ID;
                       n.text = c.Name;
                       n.attributes = c;
                       n.iconCls = "icon-menu";
                       n.children = getTreeRow(c);
                       nodes.push(n);
                   }
               }
               //有子模块
               if (dic.menus && dic.menus.length > 0) {
                   var m;
                   for (var i in dic.menus) {
                       m = dic.menus[i];
                       var n = {};
                       n.id = i
                       n.text = m.name;
                       n.attributes = m;
                       n.iconCls = "icon-menu";
                       nodes.push(n);
                   }
               }
               return nodes;
           }
           function opentab(name, path) {
               var ps = $('#tabcenter').tabs('tabs');
               for (var i in ps) {
                   var opt = $(ps[i]).panel('options');
                   if (opt.href == path) {
                       $('#tabcenter').tabs('select', parseInt(i));
                       return;
                   }
               }
               $('#tabcenter').tabs({
                   onClose: function (title, index) {
                      // var p = $('#tabcenter').tabs('getTab', index);
                      // $(this).panel('destroy');
                   }
               });
               $('#tabcenter').tabs('add', {
                   title: name,
                   closable: true,
                   cache: true,
                   href: path
               });
               tabClose();
           }
           function tabClose() {
               /*双击关闭TAB选项卡*/
               $(".tabs-inner").dblclick(function () {
                   var subtitle = $(this).children(".tabs-closable").text();
                   $('#tabcenter').tabs('close', subtitle);
               })
               /*为选项卡绑定右键*/
               $(".tabs-inner").bind('contextmenu', function (e) {
                   $('#mm').menu('show', {
                       left: e.pageX,
                       top: e.pageY
                   });

                   var subtitle = $(this).children(".tabs-closable").text();

                   $('#mm').data("currtab", subtitle);
                   $('#tabcenter').tabs('select', subtitle);
                   return false;
               });
           }
           //绑定右键菜单事件
           function tabCloseEven() {
               //关闭当前
               $('#mm-tabclose').click(function () {
                   var currtab_title = $('#mm').data("currtab");
                   $('#tabs').tabs('close', currtab_title);
               })
               //全部关闭
               $('#mm-tabcloseall').click(function () {
                   $('.tabs-inner span').each(function (i, n) {
                       var t = $(n).text();
                       $('#tabs').tabs('close', t);
                   });
               });
               //关闭除当前之外的TAB
               $('#mm-tabcloseother').click(function () {
                   var currtab_title = $('#mm').data("currtab");
                   $('.tabs-inner span').each(function (i, n) {
                       var t = $(n).text();
                       if (t != currtab_title)
                           $('#tabs').tabs('close', t);
                   });
               });
               //关闭当前右侧的TAB
               $('#mm-tabcloseright').click(function () {
                   var nextall = $('.tabs-selected').nextAll();
                   if (nextall.length == 0) {
                       //msgShow('系统提示','后边没有啦~~','error');
                       //  alert('后边没有啦~~');
                       return false;
                   }
                   nextall.each(function (i, n) {
                       var t = $('a:eq(0) span', $(n)).text();
                       $('#tabs').tabs('close', t);
                   });
                   return false;
               });
               //关闭当前左侧的TAB
               $('#mm-tabcloseleft').click(function () {
                   var prevall = $('.tabs-selected').prevAll();
                   if (prevall.length == 0) {
                       // alert('到头了，前边没有啦~~');
                       return false;
                   }
                   prevall.each(function (i, n) {
                       var t = $('a:eq(0) span', $(n)).text();
                       $('#tabs').tabs('close', t);
                   });
                   return false;
               });

               //退出
               $("#mm-exit").click(function () {
                   $('#mm').menu('hide');
               })
           }
           function showMessage() {
               webjs.showMsg();
           }
           function showscan() {
               codescan.show();
           }
           function showhelp() {
               var t = new toolstrip();
               t.showhelp("Help/index.html", "");
           }
           function showpass() {
               $('#passedit').dialog({
                   buttons: [{
                       text: '确认修改',
                       iconCls: 'icon-ok',
                       handler: function () {
                           if (webjs.isLogin) {
                               var op = $('#oldpass').val();
                               var np = $('#newpass').val();
                               var nnp = $('#nnewpass').val();
                               if (op == undefined || op == null || op == "") {
                                   $.messager.alert('异常', "原密码不能为空！", 'info');
                                   return;
                               }
                               if (np == undefined || np == null || np == "") {
                                   $.messager.alert('异常', "新密码不能为空！", 'info');
                                   return;
                               }
                               if (nnp == undefined || nnp == null || nnp == "") {
                                   $.messager.alert('异常', "确认新密码不能为空！", 'info');
                                   return;
                               }
                               if (np != nnp) {
                                   $.messager.alert('异常', "确认新密码与新密码不相同！", 'info');
                                   return;
                               }
                               webjs.uppass(np, op);
                           }
                           else {
                               $.messager.alert('消息', "请先登录系统！", 'info');
                           }
                       }
                   }, {
                       text: '取消',
                       handler: function () {
                           $('#passedit').dialog('close');
                       }
                   }]
               });
               $('#passedit').dialog("open");
           }
           function getChartReport() {
               opentab("测试", "Views\\ST\\ChartReport.htm");
           }
          
       </script>
    <title id="titleName" title="WMS仓库执行系统"></title>
      
       <style type="text/css">
           .style1
           {
               width: 564px;
               
           }
           .style2
           {
               width: 331px;
           }
           .aaa{
	display:inline-block;
	padding:1px 3px;
	text-decoration:none;
	color:#fff;
    }
.aaa a.hover{
	text-decoration:underline;
    }
     .aaa a.download-link{
	color:#0000ff;
     } 
       </style>
      
</head>
<body class="easyui-layout">
		<div region="north" style="height:50px; background-color:#0E2D5F; ">
           
    <table style="width: 100%; height:100%">
        <tr>
            <td style="width:86px">
              <img id="imgSrc" alt="" src="images/logo.jpg"
                style="border:0px solid black; position: absolute; z-index: inherit; top: 6px; left: 10px; height: 38px; width: 80px;" />
            </td>
            <td style="color: #FFFFFF;" >
              <label id="clentname" style="font-weight: bolder; font-size:24px;">世通国际</label>
            </td>
            <td style="color: #FFFFFF; font-weight: bolder;" class="style1">
               <div id='loginnametext'/>
            </td>
            <td align="center" valign="bottom" style="color: #95B8E7; font-weight: bolder;">
               <!--选择皮肤<select id="selectpf" class="easyui-combobox" style="width:60px; height: 10px;" 
                    panelHeight="auto">
                <option value="default">默认</option>  
                <option value="gray">淡色</option>  
                <option value="black">黑色</option>  
                <option value="metro">微软</option>  
               </select>-->
               <div style="padding:5px;">
<!--		<a class="aaa" href="#" onclick="showscan();">打开扫描</a> |-->
        <a class="aaa" href="#" onclick="showpass();">修改密码</a> 
		<a class="aaa" href="#" onclick="">关于</a> |
        <a class="aaa" href='#' onclick='out()'>退出</a>
	     </div>
               </td>
        </tr>
    </table>
        </div>
		<div region="south" split="true" style="height:60px;padding:8px;background:#efefef;"><!--background-color:rgba(0,0,0,.7);-->
			<div class="easyui-layout" fit="true" style="background:#ccc;">
                <div region="west" split="false" border="true" style="width:200px;background:#efefef;">
                <div style="margin:auto;text-align:center;line-height:30px; color: #0E2D5F;"><b>消息<a href="#" id="msgaaa" onclick="showMessage()">0</a>条</b></div>
                </div>
				<div region="center" style=" margin:auto;text-align:center;line-height:30px; ">Copyright © StWms   世通国际物流(北京)有限公司 TRANS-GLOBAL TRADING & LOGISTICS LIMITED   技术支持：010-6462 2487‍
                    </div>
				<div region="east" split="false" border="true" style="width:200px;background:#efefef;">
                <div style="margin:auto;text-align:center;line-height:15px; color: #0E2D5F;">

                </div>
                </div>
                
			</div>
		</div>
		<div region="west" split="true" title="菜 单" style="width:200px;padding:1px;overflow:hidden;">
			<div class="easyui-accordion" fit="true" border="false" id="mainmenu">                    
			</div>
		</div>
		<div region="center" id="region" style="overflow:hidden;">
			<div class="easyui-tabs" id="tabcenter" fit="true" border="false">
				<div title="欢迎页面" style="padding:20px;overflow:hidden;">
                    <div id="pp1" style="position:relative">
                        <div style="width:100%;height:130px;margin-left:1px;">	
                            <div id="pgrid" title="待办任务" style="text-align:center;height:120px;padding:1px;">					
				            </div>	 
                        </div> 
                    </div> 
                    <div id="pp" style="position:relative;">
			            <div style="width:50%;">	
                         	 <div id="container" title="客户业务量统计" style="text-align:center;height:375px;padding:1px;">					
				            </div>	 
                        </div> 
			            <div style="width:50%;margin-left:2px;">	
                         	 <div id="container1" title="业绩完成情况统计" style="text-align:center;height:375px;padding:1px;">					
				            </div>	 
                         </div>
			        </div>
		        </div> 	
			</div>
		</div>
        <div id="temp"></div>
        <div id="passedit" class="easyui-dialog"  closed="true" title="修改密码" style="padding:5px;width:400px;height:200px;">
           <table>
           <tr><td>原密码：</td><td><input type="password" id="oldpass" name="oldpass"/></td></tr>
           <tr><td>新密码：</td><td><input type="password" id="newpass" name="newpass"/></td></tr>
           <tr><td>确认新密码：</td><td><input type="password" id="nnewpass" name="nnewpass"/></td></tr>
           </table>
        </div>
    <div id="mm" style="width:120px;">
    <div id="mm-tabclose">关闭当前</div>
    <div id="mm-tabcloseall">全部关闭</div>
    <div id="mm-tabcloseother">关闭除当前之外的TAB</div>
    <div id="mm-tabcloseright">关闭当前右侧的TAB</div>
     <div id="mm-tabcloseleft">关闭当前左侧的TAB</div>
    <div id="mm-exit">退出</div>
    </div>

</body>
</html>